//配置七牛云密钥
//账户的配置
const { REDIS_CONF } = require('./db_config');
const env_config = require('./env_config');

module.exports = {
  commonPageConf: {
    logoImg: '/img/logo.jpg',
    logoTitle: '智能算法推荐平台',
    navItem: [
      '每日推荐',
      '题库',
      '教程',
      '搜索'
    ],
    navLink: [
      '/user/recom-problem',
      '/problem-store',
      '/teaching',
      '/search'
    ],
    loginItem: [
      '注册',
      '登录',
    ],
    loginItemLink: [
      '/user/register',
      '/user/login',
    ],
    userCenterTitle: '个人中心',
    userCenterLink: '/user/user-center',
    operationItem: [
      '网站入门',
      '中/英'
    ],
    operatioinItemLink: [
      '/guide',
      '/set-language'
    ],
    searchTips: '搜题目',
    commonStyleScript: {
      stylesheets: [
        '/css/common.css',
        '/css/iconfont.css',
        '/layui/css/layui.css'
      ],
      scripts: [
        '/js/common.js'
      ],
    }
  },
  pageConf: {
    //主页
    index: {
      stylesheets: [
        '/css/common.css',
        '/css/index.css',
        '/css/swiper5.min.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        'js/swiper5.min.js',
        'layui/layui.all.js',
        'js/index.js'
      ],
      swiper_img: [
        'img/slider2.png',
        'img/slider1.png',
        'img/slider3.png'
      ],
      swiper_title: [
        '轮播',
        '轮播',
        '轮播',
      ],
      notify_title: '公告',
      ranking_title: '答题天梯榜',
      ranking_head: [
        '排名',
        '昵称',
        '答题数',
        '时长',
        '注册时间'
      ],
      problem_head: [
        '题号',
        '题名',
        '类型',
        '难度',
        '提交次数',
        '通过率'
      ],
      problem_wrap_title: '每日推荐题目'
    },
    //end

    //注册
    register: {
      stylesheets: [
        '/css/register.css',
      ],
      scripts: [

      ],
    },
    //end

    error404: {
      stylesheets: [
        '/css/common.css',
        '/css/err404.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        'layui/layui.all.js',
      ],
    },

    //推荐题目页面
    recom_problem: {
      stylesheets: [
        '/css/common.css',
        '/css/recom_problem.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        '/layui/layui.all.js',
        '/js/jquery.js',
        '/js/recom_problem.js'
      ],
      problem_head: [
        '题号',
        '题名',
        '类型',
        '难度',
        '提交次数',
        '通过率'
      ],
      problem_wrap_title: '每日推荐题目'
    },
    //end

    //个人中心
    userCenter: {
      stylesheets: [
        '/css/common.css',
        '/css/user_center.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        '/layui/layui.all.js',
        '/js/jquery.js',
        '/js/user_center.js'
      ],
      record_head: [
        '序号',
        '题号',
        '题目',
        '类型',
        '提交结果',
        '时间'
      ]
    },
    //end

    //题库页面
    problemStore: {
      stylesheets: [
        '/css/common.css',
        '/css/problem_store.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        '/layui/layui.all.js',
        '/js/jquery.js',
        '/js/problem_store.js'
      ],
      ranking_head: [
        '排名',
        '昵称',
        '答题数',
        '时长',
        '注册时间'
      ],
      problem_head: [
        '题号',
        '题名',
        '类型',
        '难度',
        '提交次数',
        '通过率'
      ],
      problem_wrap_title: '题库页面'
    },
    //end

    // 添加题目
    // add problem
    add_problem: {
      stylesheets: [
        '/css/common.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        '/js/swiper5.min.js',
        '/layui/layui.all.js',
        '/js/index.js'
      ],
      inputFiled: [
        {
          title: '题目id',
          name: 'pid'
        },
        {
          title: '标题',
          name: 'title'
        },
        {
          title: '类型id',
          name: 'problemTypeId'
        },
        {
          title: '难度',
          name: 'difficulty'
        },
        {
          title: '内容',
          name: 'content'
        },
        {
          title: '示例',
          name: 'example'
        }
      ]
    },
    //end

    //管理题目
    //manager-problem
    manageProblem: {
      table_head: [
        '题号',
        '题名',
        '类型',
        '难度',
        '题目详情',
        '示例',
        '操作',
        '操作'
      ],
      stylesheets: [
        '/css/common.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        '/layui/layui.all.js'
      ],
    },
    //end

    // 编辑题目
    // edit problem
    editProblem: {
      inputFiled: [
        {
          title: '题目id',
          name: 'pid'
        },
        {
          title: '标题',
          name: 'title'
        },
        {
          title: '类型id',
          name: 'problemTypeId'
        },
        {
          title: '难度',
          name: 'difficulty'
        },
        {
          title: '内容',
          name: 'content'
        },
        {
          title: '示例',
          name: 'example'
        }
      ],
      stylesheets: [
        '/css/common.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        '/layui/layui.all.js'
      ],
    },
    //end

    // 添加题目类型
    // add problem type
    add_problem_type: {
      inputFiled: [
        {
          title: '类型名',
          name: 'type_title'
        },
        {
          title: '是否是基础类型',
          name: 'isBasic'
        }
      ],
      stylesheets: [
        '/css/common.css',
        '/layui/css/layui.css',
        '/css/iconfont.css'
      ],
      scripts: [
        '/layui/layui.all.js'
      ],
    },
    //end

    //管理题目类型
    //manage Problem Type
    manageProblemType: {
      table_head: [
        '类型id',
        '类型名',
        '是否基础类型',
        '操作',
        '操作'
      ],
      stylesheets: [
        '/css/common.css',
        '/layui/css/layui.css'
      ],
      scripts: [
        '/layui/layui.all.js'
      ],
    },
    //end

    // 编辑题目类型页面
    // edit Problem Type
    editProblemType: {
      inputFiled: [
        {
          title: '类型名',
          name: 'type_title'
        },
        {
          title: '是否是基础类型',
          name: 'isBasic'
        }
      ],
      stylesheets: [
        '/css/common.css',
        '/layui/css/layui.css'
      ],
      scripts: [
        '/layui/layui.all.js'
      ],
    },
    // end

    //详情页
    problemDetail: {
      stylesheets: [
        '/css/common.css',
        '/css/iconfont.css',
        '/layui/css/layui.css',
        '/css/problem_detail.css'
      ],
      scripts: [
        '/js/common.js',
        '/js/jquery.js',
        '/js/problem_detail.js'
      ],
    }

  },

  qiniu: {
    keys: {
      ak: 'tplp3wN9s9GKC3jDD_sjR3uYhvSHIGePHbN3a8Lg',  //七牛ak
      sk: 'f3W65Ny_dTa8le021cIn6RH7UaAW2fhWQ_1ojaUQ',
    },
    bucket: {
      tximg: {
        bucket_name: 'txcourse-image', //空间名字
        domain: 'http://tximg.wujinhui.xyz/', //解析的域名
      }
    }
  },
  crawlerConf: {
    url: {
      main: 'https://msiwei.ke.qq.com/#tab=0&category=-1',
      course: 'https://msiwei.ke.qq.com/#tab=1&category=-1',
      teacher: 'https://msiwei.ke.qq.com/#tab=2&category=-1',
      aboutUs: 'https://msiwei.ke.qq.com/#tab=3&category=-1',
    }
  },

  //项目的session cookie配置
  sessionInfo: {
    //配置session用到的配置项
    keys: ['a1!s2@d3#f4$_+g5%h6^'], //取个随机字符串即可
    name: 'algorithm_final_design.sid',  //什么项目 + .sid
    prefix: 'algorithm_final_design.sess', //什么项目 + .sess， 是session的简称	
  },
  cookieInfo: {
    path: '/',
    httpOnly: true,
    // signed: true,  //默认为true
    maxAge: 24 * 60 * 60 * 1000,  //配置过期时间为一天
  },
  redisInfo: {
    all: `${REDIS_CONF[1]}:${REDIS_CONF[0]}}`
  },
  //配置初始的admin管理员账户
  adminInfo: {
    username: 'admin',
    password: 'admin'
  },


  //配置加密密钥
  cryptoSecret: 'DFKLfoisdf@#F#K5dsjk54*&76&#',
  //跨域源配置
  corsOrigin: env_config.corsOrigin
}


